
#ifndef GOMOKU_CORE_IREFEREE_H__
# define GOMOKU_CORE_IREFEREE_H__

# include <gomoku/core/Gomoku.h>

namespace gomoku
{
    // forward declaration
    class IPlayer;
    class IGui;

    class IReferee
    {
    public:
        // signal
        virtual void connectGui(IGui *) = 0;
        virtual void connectBlack(IPlayer *) = 0;
        virtual void connectWhite(IPlayer *) = 0;

        // STATE title screen : from gui keep next match to launch.
        virtual void nextMatch(Match const &) = 0;

        // STATE game : loop game while have not victory.
        virtual void launch() = 0;
        // RULES
        virtual bool checkMove(Move const &) = 0;
        // if move is correct update goban for referee, gui and players.
        virtual void updateGoban(Move const &) = 0;
        // switch player and said to gui
        virtual void switchPlayer(Color) = 0;
    };
}

#endif  // GOMOKU_CORE_IREFEREE_H__
